#version 330 core

in vec3 position;
in vec3 normal;
in vec3 color;

out vec3 aPos;
out vec3 aNormal;
out vec3 aColor;

uniform mat4 proj;
uniform mat4 view;
uniform mat4 model;

void main() {  
    aPos = vec3(model * vec4(position, 1.0));
    aNormal = mat3(transpose(inverse(model))) * normal;
    aColor = color;

    gl_Position = proj * view * vec4(aPos, 1.0);

}